// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the GNU Affero General Public License v3.0.
// See the LICENCE file in the repository root for full licence text.

.landing-hero {
  @side-padding: 50px;
  @height: 450px;
  .default-box-shadow();
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: @height;
  background-color: #333;
  position: relative;

  &__bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  &__bg-container {
    .full-size();

    &::after {
      .full-size();
      content: "";
      background-color: hsla(var(--hsl-b6), 0.5);
    }
  }

  &__graph {
    position: absolute;
    width: 100%;
    height: 70px;
    position: absolute;
    bottom: 0;
    left: 0;
  }

  &__info {
    .default-text-shadow();
    font-size: @font-size--normal;
    color: #fff;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 30px @side-padding;
    text-align: center;

    @media @desktop {
      text-align: right;
    }
  }

  &__logo {
    .at2x-simple("~@images/layout/osu-logo.png");
    width: @logo-size;
    height: @logo-size;
    background-size: contain;
    flex: none;
    margin-bottom: -3px;
    will-change: opacity;
    transition: all 1s;

    @media @desktop {
      opacity: 0;
    }
  }

  &__message-extra {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;

    @media @desktop {
      align-items: flex-end;
    }

    &--bottom {
      top: 100%;
      margin-top: 20px;
    }

    &--top {
      bottom: 100%;
      margin-bottom: 20px;
    }
  }

  &__message-extra-container {
    height: 0;
    position: relative;
  }

  &__messages {
    width: 100%;
    padding: 0 @side-padding;

    text-align: center;
    position: relative;

    @media @desktop {
      text-align: right;
    }
  }

  &__pippi {
    .own-layer();
    position: absolute;
    left: 0;
    // Not properly aligned in Firefox with 0px at certain zoom level.
    // Thankfully chart usually covers the bottom part.
    bottom: 1px;
    margin-left: @side-padding;
    height: 466px;
    width: calc(100% - @side-padding);
    max-width: 328px;
    background-size: contain;
    .at2x-simple("~@images/layout/pippi.png");
    transition: all 1s;

    @media @mobile {
      opacity: 0;
    }
  }

  &__pippi-logo {
    .at2x-simple("~@images/landing/logo.png");
    width: 100%;
    height: 100%;
    background-size: contain;
  }

  &__slogan-main {
    .default-text-shadow();
    margin: 0 0 5px;
    padding: 0;
    color: #fff;
    font-size: @font-size--title;
  }

  &__slogan-sub {
    .default-text-shadow();
    margin: 0;
    padding: 0;
    color: @pink-light;
    font-size: @font-size--title-small-3;
  }
}
